function test1() {
  let x = 0;
  if (x = 1) { // error
    console.log("bad");
  }
}
